<?php
namespace app\admin\validate;

use think\Validate;

class AdminValidate extends Validate
{
    protected $rule =   [
        'username'  => 'require|max:10|min:4',
        'password'   => 'require|min:6',
    ];

    protected $message  =   [
        'username.require' => '用户名必须输入',
        'username.max'     => '用户名最多不能超过10个字符',
        'username.min'     => '用户名最少不能少于4个字符',
        'password.require' => '密码必须输入',
        'password.min'   => '密码最少不能少于6个字符',
    ];

}